<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>翻转动画例子原理</title>
    <style>
        .box{
            position: relative;
            width: 500px;
            height: 500px;
            margin: 0 auto;
            overflow: hidden;
        }
        .box:hover .box2{
            transform: rotateY(0deg);
        }
        .box:hover .box1{
            transform: rotateY(180deg);
        }
        .t{
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            line-height: 500px;
            text-align: center;
            color:#fff;
            transition: all 3s;
            border-radius: 50%;
        }
        .box1{
            background-color: orchid;
        }
        .box2{
            background-color: orange;
            transform: rotateY(180deg)
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="box1 t">box1</div>
        <div class="box2 t">box2</div>
    </div>
</body>
</html>